// import React, { Component } from 'react';
// import { BrowserRouter as Router, Link, Route, Routes, NavLink, Navigate } from 'react-router-dom'
// import Login from './pages/Login'
// import './App.css'
// import Index from './pages/Index';
// import Home from './pages/Home';
// import NotFount from './pages/NotFount';
// import VisitorList from './pages/visitors/VisitorList';
// import VisitorAdd from './pages/visitors/VistitorAdd';
import { useNavigate } from "react-router-dom"
const App = () => {
    const navigate = useNavigate()
    console.log('navigate', navigate)
  
   const getId = () => {
     // this.props.history.push('/index') -> navigate('/index)
   }
   
  
  // xxx
  return <>
  <button onClick={getId}>获取id</button>
    App
  </>
}

export default App